package com.dameng.pts_handler.utils;

import android.content.Context;
import android.widget.Toast;
/**
 * @author ChrisLanbo.H.Demon
 *
 * @date 2015-12-29
 *
 * @function 功能 创建单例toast，快速显示toast
 *
 */
public class ToastUtils {

	private static Toast toast;

	/**
	 * @function  
	 * @param context 上下文
	 * @param string 需要显示的字符串
	 */
	public static void showToast(Context context, String string) {
		if(toast == null){
			toast = Toast.makeText(context, "", Toast.LENGTH_SHORT);
		}
		toast.setText(string);
		toast.show();
	}

	
	
}
